package com.leyou.common.exception;

import com.leyou.common.enums.ExceptionEnum;
import lombok.Getter;

/**
 *  公共异常
 */
@Getter
public class LyException extends RuntimeException{

    //状态码
    private int status;

    public LyException(int status,String message){
        super(message);
        this.status = status;
    }

    /**
     *  处理枚举信息
     */
    public LyException(ExceptionEnum enums){
        super(enums.getMessage());
        this.status = enums.getStatus();
    }

}
